<form method="post" enctype="multipart/form-data" target="_blank" id="form-goodsType">
    <div class="table-responsive">
        <table class="table table-bordered table-hover">
            <thead>
                <tr>
                    <th style="width: 1px;" class="text-center">
                        <input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', this.checked);">
                    </th>
                    <th class="sorting text-center">ID</th>
                    <th class="sorting text-center">规格类型</th>
                    <th class="sorting text-center">规格名称</th>
                    <th class="sorting text-center" style=" width: 400px;">规格项</th>
                    <th class="sorting text-center">筛选</th>
                    <th class="sorting text-center">排序</th>
                    <th class="sorting text-center">操作</th>
                </tr>
            </thead>
            <tbody>
            <volist name="specList" id="list">
                <tr>
                    <td class="text-center">
                        <input type="checkbox" name="selected[]" value="6">
                    </td>
                    <td class="text-center">{$list.id}</td>
                    <td class="text-left">{$goodsTypeList[$list[type_id]][name]}</td>
                    <td class="text-left">{$list.name}</td>
                    <td class="text-left">{$list.spec_item}</td>
                    <td class="text-center">
                        <img width="20" height="20" src="__PUBLIC__/images/<if condition='$list[search_index] eq 1'>yes.png<else />cancel.png</if>" onclick="changeTableVal('spec', 'id', '{$list.id}', 'search_index', this)"/>
                    </td>
                    <td class="text-center">
                        <input type="text" class="form-control input-sm" onchange="updateSort('spec', 'id', '{$list.id}', 'order', this)" onkeyup="this.value = this.value.replace(/[^\d]/g, '')" onpaste="this.value=this.value.replace(/[^\d]/g,'')" size="4" value="{$list.order}" />
                    </td>
                    <td class="text-left">
                        <a href="{:U('Admin/goods/addEditSpec',array('id'=>$list['id']))}" data-toggle="tooltip" title="" class="btn btn-primary" data-original-title="编辑"><i class="fa fa-pencil"></i></a>
                        <a href="javascript:del_fun('{:U('Goods/delGoodsSpec',array('id'=>$list['id']))}');" id="button-delete6" data-toggle="tooltip" title="" class="btn btn-danger" data-original-title="删除"><i class="fa fa-trash-o"></i></a></td>
                </tr>
            </volist>
            </tbody>
        </table>
    </div>
</form>
<div class="row">
    <div class="col-sm-6 text-left"></div>
    <div class="col-sm-6 text-right">{$page}</div>
</div>
<script>
    $(".pagination  a").click(function () {
        cur_page = $(this).data('p');
        ajaxGetTable('search-form2', cur_page);
    });
</script>
